<template>
  <div>
    <h1 v-if="payment">恭喜你支付成功</h1>
     <h1 v-else>支付失败</h1>
  </div>
</template>

<script>
import { GetPaymentData } from "@/common/api/order";
export default {
  data(){
    return{
      payment:false,
    }
  },
  methods: {},
  mounted() {
    let datas = {
      out_trade_no: this.$route.query.out_trade_no,
      trade_no: this.$route.query.trade_no,
    };
    GetPaymentData(datas).then(res=>{
      if(res.data.data.code=2){
          this.payment=true
      }
    });
  },
};
</script>

<style>
</style>